<?php $this->extend('comm/page');?>

<div class="panel panel-default panel-intro">
    <?php echo $this->build_heading(); ?>
    <div class="panel-body">
        <div id="toolbar" class="toolbar">
            <?php echo $this->build_toolbar(['refresh', 'add']); ?>
            <a href="javascript:;" class="btn btn-danger btn-toggle-all">
                <i class="fa fa-minus"></i>
                显示全部
            </a>
        </div>
        <table id="table" lay-filter="table" class="mr-b-sm"></table>
    </div>
</div>

<!-- 操作 -->
<script type="text/html" id="oper">
    <?php if($this->checkAuth('/admin/sys/menu/add', $userInfo['id'])): ?>
    {{# if(d.status == 1){ }}
    <button type="button" class="btn btn-xs btn-success" lay-event="add"><i class="fa fa-plus"> 新增子菜单</i></button>
    {{# } }}
    <?php endif; ?>
    <?php if($this->checkAuth('/admin/sys/menu/edit', $userInfo['id'])): ?>
    <button type="button" class="btn btn-xs btn-info" lay-event="edit"><i class="fa fa-pencil"> 编辑菜单</i></button>
    <?php endif; ?>
</script>